@include('admin.header')
<style>
  .search_product {
    max-height:248px;
    overflow-y: scroll;
  }
  .search_product > .item {
    width:80px;
    margin-right:5px;
    float:left;
  }
  .search_product > .item img {
    height:80px;
  }
  .search_product > .item .name {
    height:20px;
    overflow:hidden;
  }
  .order_info {
    display: block;
    margin-top: 5px;
  }
  .line {
    border: 3px dashed #ccc;
    margin-top: 10px;
    margin-bottom: 20px;
  }
</style>
<div class="margin-top-20">
  <form method="post" class="form-horizontal js-ajax-form direct_add_form" action="/globalexchange/direct_add_submit" novalidate="novalidate" enctype ="multipart/form-data">
    <fieldset>
      <!-- **********************用户基本信息********************** -->
      <!-- 用户ID号 -->
      <div class="control-group"><label class="control-label">用户ID号</label>
        <div class="controls">
          <span class="order_info">{{$user_info->nodeid}}</span>
        </div>
      </div>
      <!-- 头像 -->
      <div class="control-group"><label class="control-label">头像</label>
        <div class="controls">
          @if(!empty($user_info->photourl))
            <img src="{{$user_info->photourl}}" style="height:80px;" />
          @endif
        </div>
      </div>
      <!-- 用户账号 -->
      <div class="control-group"><label class="control-label">用户账号</label>
        <div class="controls">
          <span class="order_info">{{$user_info->nodecode}}</span>
        </div>
      </div>
      <!-- 用户名 -->
      <div class="control-group"><label class="control-label">用户名</label>
        <div class="controls">
          <span class="order_info">{{$user_info->nodename}}</span>
        </div>
      </div>
      <!-- 邮箱 -->
      <div class="control-group"><label class="control-label">邮箱</label>
        <div class="controls">
          <span class="order_info">{{$user_info->email or '暂无'}}</span>
        </div>
      </div>
      <!-- 是否认证 -->
      <div class="control-group"><label class="control-label">是否实名认证</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->isconfirmed == 1)
              是
            @else
              否
            @endif
          </span>
        </div>
      </div>
      <!-- 是否购买区代 -->
      <div class="control-group"><label class="control-label">是否购买区代</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->is_project == 1)
              是
            @else
              否
            @endif
          </span>
        </div>
      </div>
      <!-- 是否购买手机区待 -->
      <div class="control-group"><label class="control-label">是否购买手机区待</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->is_phone_agent == 1)
              是
            @else
              否
            @endif
          </span>
        </div>
      </div>
      <!-- 推荐人 -->
      <div class="control-group"><label class="control-label">推荐人</label>
        <div class="controls">
          <span class="order_info">
            @if(isset($user_info->parent_name))
              {{$user_info->parent_name}}
            @else
              暂无
            @endif
          </span>
        </div>
      </div>
      <!-- 注册时间 -->
      <div class="control-group"><label class="control-label">注册时间</label>
        <div class="controls">
          <span class="order_info">{{$user_info->createtime}}</span>
        </div>
      </div>
      <!-- 用户状态 -->
      {{--<div class="control-group"><label class="control-label">用户状态</label>--}}
        {{--<div class="controls">--}}
          {{--<span class="order_info">--}}
            {{--@if($user_info->status == 0)--}}
              {{--未激活--}}
            {{--@elseif($user_info->status == 1)--}}
              {{--已激活--}}
            {{--@elseif($user_info->status == 2)--}}
              {{--已注销--}}
            {{--@elseif($user_info->status == 3)--}}
              {{--已封锁--}}
            {{--@endif--}}
          {{--</span>--}}
        {{--</div>--}}
      {{--</div>--}}
      <!-- 实名验证时间 -->
      {{--<div class="control-group"><label class="control-label">实名验证时间</label>--}}
        {{--<div class="controls">--}}
          {{--<span class="order_info">{{$user_info->authtime or '未验证'}}</span>--}}
        {{--</div>--}}
      {{--</div>--}}
      <!-- 用户等级 -->
      {{--<div class="control-group"><label class="control-label">用户等级</label>--}}
        {{--<div class="controls">--}}
          {{--<span class="order_info">{{$user_info->nodelevel}}级</span>--}}
        {{--</div>--}}
      {{--</div>--}}

      <!-- 分割线 -->
      <div class="line"></div>

      <!-- **********************身份证信息********************** -->
      @if($user_info->identity_id)
      <!-- 身份证ID号 -->
      <div class="control-group"><label class="control-label">身份证ID号</label>
        <div class="controls">
          <span class="order_info">{{$user_info->identity_id}}</span>
        </div>
      </div>
      <!-- 身份证名 -->
      <div class="control-group"><label class="control-label">身份证名</label>
        <div class="controls">
          <span class="order_info">{{$user_info->identity_name}}</span>
        </div>
      </div>
      <!-- 身份证编号 -->
      <div class="control-group"><label class="control-label">身份证编号</label>
        <div class="controls">
          <span class="order_info">{{$user_info->identity_no}}</span>
        </div>
      </div>
      <!-- 生日 -->
      <div class="control-group"><label class="control-label">生日</label>
        <div class="controls">
          <span class="order_info">{{$user_info->birthday}}</span>
        </div>
      </div>
      <!-- 性别 -->
      <div class="control-group"><label class="control-label">性别</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->sex == 0)
              女
            @else
              男
            @endif
          </span>
        </div>
      </div>
      <!-- 民族 -->
      <div class="control-group"><label class="control-label">民族</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->nation)
              {{$user_info->nation}}
            @else
              暂无
            @endif
          </span>
        </div>
      </div>
      <!-- 有效期开始时间 -->
      <div class="control-group"><label class="control-label">有效期开始时间</label>
        <div class="controls">
          <span class="order_info">{{$user_info->begin_time}}</span>
        </div>
      </div>
      <!-- 有效期结束时间 -->
      <div class="control-group"><label class="control-label">有效期结束时间</label>
        <div class="controls">
          <span class="order_info">{{$user_info->end_time}}</span>
        </div>
      </div>
      <!-- 签发机关 -->
      <div class="control-group"><label class="control-label">签发机关</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->issuing)
              {{$user_info->issuing}}
            @else
              暂无
            @endif
          </span>
        </div>
      </div>
      <!-- 身份证状态 -->
      <div class="control-group"><label class="control-label">身份证状态</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->identity_status == 0)
              禁用
            @elseif($user_info->identity_status == 1)
              正常
            @elseif($user_info->identity_status == 2)
              删除
            @endif
          </span>
        </div>
      </div>
      <!-- 地址 -->
      <div class="control-group"><label class="control-label">地址</label>
        <div class="controls">
          <span class="order_info">
            @if($user_info->address)
              {{$user_info->address}}
            @else
              暂无
            @endif
          </span>
        </div>
      </div>
      <!-- 证件头像 -->
      <div class="control-group"><label class="control-label">证件头像</label>
        <div class="controls">
          @if(!empty($user_info->head_photo))
            <img src="{{$user_info->head_photo}}" style="height:80px;" />
          @endif
        </div>
      </div>
      <!-- 身份证正面图 -->
      <div class="control-group"><label class="control-label">身份证正面图</label>
        <div class="controls">
          @if(!empty($user_info->front_photo))
            <img src="{{$user_info->front_photo}}" style="height:80px;" />
          @endif
        </div>
      </div>
      <!-- 身份证反面图 -->
      <div class="control-group"><label class="control-label">身份证反面图</label>
        <div class="controls">
          @if(!empty($user_info->back_photo))
            <img src="{{$user_info->back_photo}}" style="height:80px;" />
          @endif
        </div>
      </div>
      <!-- 身份证验证时间 -->
      <div class="control-group"><label class="control-label">身份证验证时间</label>
        <div class="controls">
          <span class="order_info">{{$user_info->identity_time}}</span>
        </div>
      </div>

      <!-- 分割线 -->
      <div class="line"></div>
      @endif

      <!-- **********************银行卡信息********************** -->
      @foreach($user_info->bank_info as $bank)
      <!-- 银行卡ID号 -->
      <div class="control-group"><label class="control-label">银行卡ID号</label>
        <div class="controls">
          <span class="order_info">{{$bank->bank_id}}</span>
        </div>
      </div>
      <!-- 银行卡账号 -->
      <div class="control-group"><label class="control-label">银行卡账号</label>
        <div class="controls">
          <span class="order_info">{{$bank->card_no}}</span>
        </div>
      </div>
      <!-- 开户用户姓名 -->
      <div class="control-group"><label class="control-label">开户用户姓名</label>
        <div class="controls">
          <span class="order_info">{{$bank->account_name}}</span>
        </div>
      </div>
      <!-- 银行名称 -->
      <div class="control-group"><label class="control-label">银行名称</label>
        <div class="controls">
          <span class="order_info">{{$bank->bank_name}}</span>
        </div>
      </div>
      <!-- 支行名称 -->
      <div class="control-group"><label class="control-label">支行名称</label>
        <div class="controls">
          <span class="order_info">{{$bank->branch_bank}}</span>
        </div>
      </div>
      <!-- 开户省份 -->
      <div class="control-group"><label class="control-label">开户省份</label>
        <div class="controls">
          <span class="order_info">{{$bank->province_name}}</span>
        </div>
      </div>
      <!-- 开户城市 -->
      <div class="control-group"><label class="control-label">开户城市</label>
        <div class="controls">
          <span class="order_info">{{$bank->city_name}}</span>
        </div>
      </div>
      <!-- 账户类型 -->
      <div class="control-group"><label class="control-label">账户类型</label>
        <div class="controls">
          <span class="order_info">
            @if($bank->account_type == 1)
              个人账号
            @elseif($bank->account_type == 2)
              企业账号
            @endif
          </span>
        </div>
      </div>
      <!-- 银行卡状态 -->
      <div class="control-group"><label class="control-label">银行卡状态</label>
        <div class="controls">
          <span class="order_info">
            @if($bank->status == 0)
              审核中
            @elseif($bank->status == 1)
              审核失败
            @elseif($bank->status == 2)
              审核通过
            @elseif($bank->status == 4)
              删除
            @endif
          </span>
        </div>
      </div>
      <!-- 银行联行号 -->
      <div class="control-group"><label class="control-label">银行联行号</label>
        <div class="controls">
          <span class="order_info">{{$bank->bank_num}}</span>
        </div>
      </div>
      <!-- 银行卡创建时间 -->
      <div class="control-group"><label class="control-label">银行卡创建时间</label>
        <div class="controls">
          <span class="order_info">{{$bank->createtime}}</span>
        </div>
      </div>
      <!-- 分割线 -->
      <div class="line"></div>
      @endforeach
    </fieldset>
  </form>
</div>

<script>
	$(function () {
		$('.direct_add_form').submit(function(){
			var $t = $(this),action=$t.attr('action'),data = $t.serialize();
			post(action,data,function(data){
				_alert('处理成功',function(){
					parent.location.reload();
					parent.layer.close(parent.layer_open2);
              });
            });
			return false;
        });
	});
</script>